﻿<!DOCTYPE html>
<html>
<head>
    

    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2013.1.514/kendo.common.min.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/kendo/2013.1.514/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/kendo/2013.1.514/kendo.default.min.css")" rel="stylesheet" type="text/css" />
	<link href="@Url.Content("~/Content/kendo/2013.1.514/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/MicrosoftMvcAjax.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/MicrosoftMvcValidation.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.blockUI.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/kendo/2013.1.514/kendo.web.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/kendo/2013.1.514/kendo.aspnetmvc.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/kendo/2013.1.514/kendo.dataviz.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/kendo/2013.1.514/jquery.min.js")" type="text/javascript"></script>
	
	<script src="@Url.Content("~/Scripts/kendo/2013.1.514/kendo.all.min.js")"></script>
	@*<script src="@Url.Content("~/Scripts/kendo/2013.1.514/kendo.modernizr.custom.js")"></script>*@

    <script type="text/javascript">
        /**
        * jQuery cookie plugin
        *
        * Copyright (c) Hck, 2011/10
        * Licensed under the MIT and GPL licenses:
        * http://www.opensource.org/licenses/mit-license.php
        * http://www.gnu.org/licenses/gpl.html
        *
        */

        (function ($) {
            /**
            * Function for setting cookie value and additional attributes
            *
            * @@param name - name of the cookie
            * @@param val - value of the cookie
            * @@param duration - time in seconds that cookie will be aviliable
            * @@param domain - cookie domain
            * @@param path - cookie path
            * @@param secure - allow transport cookie only through https
            */
            $.cookie = function (name, val, duration, domain, path, secure) {
                var trim = function (str) {
                    return str.replace(/(^\s+)|(\s+$)/g, '');
                };

                var cookies = {}, src = document.cookie.split(';');
                for (var k in src) {
                    src[k] = trim(src[k]);
                    if (src[k]) {
                        var cookie = src[k].split('=');
                        for (var j in cookie) cookie[j] = trim(cookie[j]);

                        if (cookie[0])
                            cookies[cookie[0]] = cookie[1] ? cookie[1] : null;
                    } else src.splice(k, 1);
                }

                if (!name) return cookies;

                var attrs = duration ? '; expires=' + new Date(new Date().getTime() + duration * 1000).toGMTString() : '';
                attrs += domain ? '; domain=' + domain : '';
                attrs += path ? '; path=' + path : '';
                attrs += secure ? '; secure' : '';

                if (val) document.cookie = name + '=' + encodeURIComponent(val) + attrs;
                else return cookies[name];

                return $;
            };

            /**
            * Function for remove cookies by their names or all cookies at once
            *
            * @@param name - name of the cookie that will be removed
            */
            $.removeCookie = function (name) {
                var cookies;
                if (name) {
                    cookies = {};
                    cookies[name] = null;
                }
                else cookies = $.cookie();

                for (var k in cookies)
                    document.cookie = k + '=; expires=' + new Date + ';';
            };
        })(jQuery);
    </script>
    <script type="text/javascript">
        $(document).ready(function () {

            $("a.loginShow").click(function () {
                $("#loginBox").toggle(300);
            });
            $(".loginHide").click(function () {
                $("#loginBox").toggle(300);
            });
            $("#txt_search").focus(function () {
                
                var defaultText = $(this).val();
                
                if (defaultText == "Search...") {
                    $(this).val('');
                }
            });

            changeBackground();
        });

        function changeBackground() {
            var navColor = $.cookie('NavColor');
            var accentColor = $.cookie('AccentColor');
            var logo = '../../Assets/images/' + $.cookie('Logo');
            
            $('#topNav').css({ 'background-color': '#' + navColor });
            $('#logo').css({ 'background-image': "url(" + logo + ")" });
            $('.default').css({ 'background-color': '#' + accentColor });
        }

    </script>

    <style type="text/css">
	    
		/* Z-index of #mask must lower than #boxes .window */
		#mask {
		  position:absolute;
		  z-index:9000;
		  background-color:#000;
		  display:none;
		  top: 0;
		  left: 0;
		}
   
		#boxes .window {
		  position:absolute;
		  width:540px;
		  height:350px;
		  display:none;
		  z-index:9999;
		  padding:20px; 
		  
		}
 
		/* Customize your modal window here, you can add background image too */
		#boxes #dialog {
		  width:575px;
		  height:450px;
		  background-color:#fff;
		}
		
		.theme
		{
			background-color:#ff0000;
		}
	</style>

	

    @*@Styles.Render("~/Content/kendo")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/kendo")*@
</head>
<body>
    <div id="mainContainer">
        <div id="topBar">
            <div id="logo">
                @*<h1>Trucking Application</h1>*@
                
            </div>
            <div class="upperright">
                <div id="languageSelect">
                    <a href="#" class="select" id="a_english">English</a> &nbsp;|&nbsp;
				    <a href="#" id="a_francis">Francis</a> &nbsp;|&nbsp;
				    <a href="#" id="a_dutch">Dutch</a> &nbsp;|&nbsp;
				    <a href="#" id="a_german">German</a>
                    <br style="clear:both;" />
				    <br style="clear:both;" />
                </div>
                <div class="search">
					<span>
						<input type="text" value="Search..." id="txt_search" name="txt_search" style="float: left;" />
						<input type="submit" value="Go!" class="button default btnSmall" style="float: left;" />
					</span>
			    </div>
            </div>
            
        </div>
        <div id="topNav">
                <ul>
                    <li>@Html.ActionLink("Home", "Index", "Home")</li>
                    @*<li>@Html.ActionLink("About", "About", "Home")</li>*@
                </ul>
                @if (Request.IsAuthenticated)
                {
                    if (User.IsInRole("Administrator"))
                    { 
                        <ul>
                            <li>@Html.ActionLink("Orders", "Index", "Order")</li>
                            <li>@Html.ActionLink("Dashboard", "Dashboard", "Account")</li>
                            <li>@Html.ActionLink("Users", "Index", "Resource")</li>
                            
                        </ul>
                    }
                    <ul style="float:right;">
                        @{
                        var alerts = TruckingApplication.Dal.Infrastructure.UserSpecifics.AlertCount;
                        var x = 123;  
                        }
                        @if(alerts != 0){
                            <li style="float: left;" class="login">@Html.ActionLink("Alerts (" + @alerts.ToString() + ")", "Alerts", "Account", null, new { @style = "color:yellow;" })</li>
                        }
					    <li style="float: left;" class="login">@Html.ActionLink("My Account", "MyAccount", "User", null, new { @class = "loginShow" })</li>
					    <li style="float: left;" class="login">@Html.ActionLink("Log Out", "LogOff", "Account", null, new { @class = "logout" })</li>
				    </ul>
                }
                else
                { 
                    <ul>
                        <li class="login" id="Li1"><a href="#" class="loginShow" onclick="return false;">My Account</a></li>
                        <div id="loginBox">
					        <div class="loginLock">
						        <img src="../../Assets/images/login_lock2.png" /><h2>My Account</h2><br />
					        </div>
                                @Html.Partial("_LogOnPartial")
						        <a href="#" class="loginHide" onclick="return false;" style="color: #fff; margin: 7px 0 0 0; display: block; font-weight: normal; font-size: 11px;">Close</a>
				        </div> 
                    </ul>
                }
            </div>
            <br />
        <div id="main">
            @RenderBody()
        </div>

        <div id="customer_feedback" style="display:none;">
		    <span style="float:right;"><a href="#" id="a_closeFeedback" class="close" onclick="return false;">close</a></span>
		    <table class="feedback">
			    <tr>
				    <td colspan="2" class="title">
				    User Feedback
				    </td>
			    </tr>
			    <tr>
				    <td>
					    <b>Email:</b>
				    </td>
				    <td>
					    <input id="txt_femail" type="text" />
				    </td>
			    </tr>
			    <tr>
				    <td>
					    <b>Subject:</b>
				    </td>
				    <td>
					    <input id="txt_fsubject" type="text" />
				    </td>
			    </tr>
			    <tr>
				    <td>
					    <b>Comment:</b>
				    </td>
				    <td>
					    <textarea id="txt_fcomment"></textarea>
				    </td>
			    </tr>
			    <tr>
				    <td colspan="2">
				    <input type="submit" id="btn_sendFeedback" class="button default btnLarge" value="Send Feedback" /><br /><br />
				    </td>
			    </tr>
		    </table>
	    </div>

        <br />
	    <br />

        <div id="footer">
		    <center>Copyright &copy; 2013 Maat Millenium | <a href="#" id="a_feedback" onclick="return false;">Send Feedback</a></center>
	    </div>
    </div>
</body>
</html>
